<?php

namespace App\Http\Controllers;

class HistoryController extends Controller
{
    public function index()
    {
        $rooms = \Auth::user()
            ->history()
            ->with('platformInfo')
            ->orderBy('updated_at', 'desc')
            ->get()
            ->map
            ->append('platform');
        return view('history', compact('rooms'));
    }
}